class FileReadDemo
 {
	public static void main(String[] felight)
	{
		String fileName = "temp.txt";
		String line = null;
		try {
			FileReader fileReader = new FileReader(fileName);
			BufferedReader br = new BufferedReader(fileReader);
			while ((line= br.readLine()) != null)
			{
				System.out.println(line);
			}
			//br.close();
			} catch(FileNotFoundException ex) {
			System.out.println("Unable to open file  '" + fileName + "'");
			} catch(IOException ex) {
			System.out.println("Error reading file '" + fileName + "'");
		}
	}
}